package com.lty.redis;

import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;

/**
 * 消费者监听
 */
@Slf4j
public class RedisReceiverListener implements MessageListener {

    @Override
    public void onMessage(Message message, byte[] pattern) {
        String messageBody = new String(message.getBody());
        log.info("RedisReceiverListener.onMessage:{}", messageBody);
    }
}